-- GENERATED SPELL FOR [Doom Lord Kazzak] --


function spell0_18728(pUnit, Event) --@Berserk,Self--
pUnit:FullCastSpellOnTarget(32965,pUnit)
pUnit:RegisterEvent('Sorts_18728', 0, 1)
end

function spell1_18728(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(16044,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18728', 620, 1)
end

function spell2_18728(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(32964,pUnit)
pUnit:RegisterEvent('Sorts_18728', 10000, 1)
end

function spell3_18728(pUnit, Event) --@Mark of Kazzak,Drain--
pUnit:FullCastSpellOnTarget(32960,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_18728', 10000, 1)
end

function spell4_18728(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(32963,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18728', 542, 1)
end

function spell5_18728(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(36706,pUnit)
pUnit:RegisterEvent('Sorts_18728', 10320, 1)
end

function spell6_18728(pUnit, Event) --@Void Bolt,n/a--
pUnit:FullCastSpellOnTarget(21066,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18728', 11500, 1)
end

function Sorts_18728(pUnit, Event)
local choix_sorts_18728 = math.random(0, 6)
if choix_sorts_18728 == 0 then
pUnit:RegisterEvent('spell0_18728', 1, 1)
end
if choix_sorts_18728 == 1 then
pUnit:RegisterEvent('spell1_18728', 1, 1)
end
if choix_sorts_18728 == 2 then
pUnit:RegisterEvent('spell2_18728', 1, 1)
end
if choix_sorts_18728 == 3 then
pUnit:RegisterEvent('spell3_18728', 1, 1)
end
if choix_sorts_18728 == 4 then
pUnit:RegisterEvent('spell4_18728', 1, 1)
end
if choix_sorts_18728 == 5 then
pUnit:RegisterEvent('spell5_18728', 1, 1)
end
if choix_sorts_18728 == 6 then
pUnit:RegisterEvent('spell6_18728', 1, 1)
end
end

function mob18728_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18728', math.random(1500, 3000), 1)
end

function mob18728_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18728_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18728_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18728, 1, 'mob18728_Action')
RegisterUnitEvent(18728, 2, 'mob18728_Leave')
RegisterUnitEvent(18728, 3, 'mob18728_Kill')
RegisterUnitEvent(18728, 4, 'mob18728_Die')
